<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/pages/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <title>部门新增</title>
    <%@ include file="/WEB-INF/pages/include/baseCSS.jsp"%>
</head>

<body>
<!-- Field Validation -->
<div class="panel" style="height:100%">
  <div class="panel-body" style="height:100%">
    <form class="form-horizontal" role="form" id="dept-form" >
      <div class="bs-component">
        <div class="form-group has-primary">
          <div class="col-xs-9">
	          <label class="col-lg-3 control-label text-right" for="name">部门名称</label>
	          <div class="col-lg-8">
	            <span class="append-icon right">
	              <i class="fa fa-gear"></i>
	            </span>
	            <input type="hidden" id="id" name="id" value="${dept.id}">
	            <input type="text" class="form-control" id="name" name="name" value="${dept.name}" required>
	          </div>
          </div>
        </div>
      </div>
      <div class="bs-component">
        <div class="form-group has-error">
         <div class="col-xs-9">
	          <label class="col-lg-3 control-label text-right" for="parentid">上级部门</label>
	          <div class="col-lg-8">
	            <span class="append-icon right">
	              <i class="fa fa-bullseye"></i>
	            </span>
	            <div class="drop-select-tree" data-tree-value="${dept.parentid}" data-tree-class="form-control" data-tree-id="parentid" data-tree-name="parentid" data-tree-url="${ctx}/dept/tree"></div>
	          </div>
          </div>
        </div>
      </div>
      <div class="bs-component">
        <div class="form-group has-info">
         <div class="col-xs-9">
          <label class="col-lg-3 control-label" for="sort">排序</label>
          <div class="col-lg-8">
            <span class="append-icon right">
              <i class="fa fa-exclamation-circle"></i>
            </span>
            <input type="number" class="form-control" name="sort" id="sort" value="${dept.sort}" required>
          </div>
         </div>
        </div>
      </div>
    </form>
  </div>
</div>

<%@ include file="/WEB-INF/pages/include/baseJS.jsp"%>
<script type="text/javascript">
	var validatorForm = validator("dept-form").addFields({
	   name: {
	       rules: 'required',
	       messages: "不能为空"
	   }
	});
	jQuery(document).ready(function() {
	 
	});
</script>
<!-- END: PAGE SCRIPTS -->
</body>
</html>
